﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Electronic_work_order.Model
{
    public class AppDbContext : DbContext
    {
        public AppDbContext(DbContextOptions<AppDbContext>  options) : base(options)
        {

        }
        //代办集合表
        public DbSet<commission>  commissions { get; set; }
        //查询职位
        public DbSet<Position> Position { get; set; }
        //角色权限表
        public DbSet<Role_Permission> role_Permissions { get; set; }
        //角色表
        public DbSet<UserRole> UserRoles { get; set; }

        //组织表
        public DbSet<Organization> organizations { get; set; }
        //用户表
        public DbSet<Users>  Users { get; set; }
        //状态表
        public DbSet<UserState> UserState { get; set; }
        //权限+角色表
        public DbSet<Role_Permission> Role_Permission { get; set; }
        //权限状态表
        public DbSet<PermissionState> PermissionStates { get; set; }
        //权限表
        public DbSet<Permission> permissions { get; set; }

        //申请状态表
        public DbSet<Process_application_State> Process_application_State { get; set; }
        //请假申请表
        public DbSet<LeaveForm> LeaveForm { get; set; }
        //物资采购表
        public DbSet<Purchase_goods> Purchase_Goods { get; set; }

        //请假是由表
        public DbSet<Leave_Type> Leave_Type { get; set; }

        //费用申请表
        public DbSet<Expense_reimbursement> expense_Reimbursements { get; set; }

        //费用申请状态表
        public DbSet<Expense_reimbursement_Type> expense_Reimbursement_Types { get; set; }


        //差旅费报销申请
        public DbSet<travel_on_business> Travel_On_Businesses { get; set; }

        //订餐申请表
        public DbSet<Ordering> ordering { get; set; }

        //套餐表
        public DbSet<Set_meal> setmeal { get; set; }

        //订餐状态表
        public DbSet<OrderState> OrderStates { get; set; }

        //人员需求表
        public DbSet<Demand> demand { get; set; }

        //申请类型表
        public DbSet<application> applications { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Seed();
        }
    }
}
